package core.testcases;

import java.util.ArrayList;

/**
 * Description : Functional Test Script
 * 
 * @author angel.tsvetkov
 */
public class TestStep {
	// String representation of the expected result
	private String expectedResult;

	// Boolean representation of the real result
	private boolean result;

	// List of actions
	public ArrayList<String> actions;

	// Test Step number
	private int number;

	// Copy constructor
	@SuppressWarnings("unchecked")
	public TestStep(TestStep step) {
		expectedResult = step.getExpectedResult();
		result = step.isResultOK();
		actions = (ArrayList<String>) step.actions.clone();
		number = step.getNumber();
	}

	// Default constructor. Initialize Array List
	public TestStep() {
		actions = new ArrayList<String>();
	}

	// Set default values to variables
	public void clear() {
		expectedResult = null;
		result = false;
		actions.clear();
		number = 0;
	}

	public void setExpectedResult(String expectedResult) {
		this.expectedResult = expectedResult;
	}

	public String getExpectedResult() {
		return expectedResult;
	}

	public void setResult(boolean result) {
		this.result = result;
	}

	public boolean isResultOK() {
		return result;
	}

	public void setNumber(int number) {
		this.number = number;
	}

	public int getNumber() {
		return number;
	}
}
